package mutris.client.board;

public class BlockPoint {

	public int x;
	public int y;
	
	public BlockPoint() {
		this(0, 0);
	}
	
	public BlockPoint(int x, int y) {
		this.x = x;
		this.y = y;
		
	}
	
	public BlockPoint(BlockPoint p) {
		this.x = p.x;
		this.y = p.y;
	}
	
	public void setLocation(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof BlockPoint) {
			BlockPoint that = (BlockPoint) obj;
			
			return (that.x == this.x) && (that.y == this.y);
		} else {
			return super.equals(obj);
		}
	}
	
	@Override
	public int hashCode() {
		return (y<<16) | x;
	}

}
